<?php

if (mysql_num_rows($sql_logs) != 0) {

	?><table style="width:600px; background:#eee" cellpadding="3" cellspacing="2">
		<tr>
			<td style="width:150px;text-align:center"><b>Date</b></td>
			<td style="width:450px;text-align:center"><b>Action</b></td>
		</tr><?

	while ($row = mysql_fetch_object($sql_logs)) {
		?><tr>
			<td style="background:#fff;text-align:center"><?=htmlentities($row->date, ENT_QUOTES, 'UTF-8')?></td>
			<td style="background:#fff">&nbsp;&nbsp;<?=htmlentities($row->log, ENT_QUOTES, 'UTF-8')?></td>
		</tr><?
	}
	
	?></table><?
}

?>

<table style="width:600px; margin-top:10px" cellpadding="3" cellspacing="2">
	<tr>
		<td style="width:300px;text-align:left">
<?php

if ($start-20 >= 0) {
?><a href="logs.php?s=<?=htmlentities($start-20, ENT_QUOTES, 'UTF-8')?>">Previous</a><?
}

?>
		</td>
		<td style="width:300px;text-align:right">
<?php

if ($total_logs > $start+20) {
?><a href="logs.php?s=<?=htmlentities($start+20, ENT_QUOTES, 'UTF-8')?>">Next</a><?
}

?>
		</td>
	</tr>
</table>
